<!doctype html>

<html <?php language_attributes(); ?>>

<head>

	<!-- Meta -->
    <meta charset="<?php echo get_bloginfo( 'charset' ); ?>" />
	
	<?php
		
		if ( get_option( 'site_description' ) != "" ) { echo '<meta name="description" content="' . stripcslashes( get_option( 'site_description' ) ) . '" />' . "\n"; }
		if ( get_option( 'site_keywords' ) != "" ) { echo '<meta name="keywords" content="' . stripcslashes( get_option( 'site_keywords' ) ) . '" />' . "\n"; }
		if ( get_option( 'site_author' ) != "" ) { echo '<meta name="author" content="' . stripcslashes( get_option( 'site_author' ) ) . '" />' . "\n\n"; }
		
		if ( get_option( 'facebook_share_title' ) != "" ) { echo '<meta property="og:title" content="' . stripcslashes( get_option( 'facebook_share_title' ) ) . '" />' . "\n"; }
		if ( get_option( 'facebook_share_description' ) != "" ) { echo '<meta property="og:description" content="' . stripcslashes( get_option( 'facebook_share_description' ) ) . '" />' . "\n"; }
		if ( get_option( 'facebook_share_thumb_img' ) != "" ) { echo '<meta property="og:image" content="' . stripcslashes( get_option( 'facebook_share_thumb_img' ) ) . '" />' . "\n"; }
		
	?>
	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
	
	<!-- RSS and Pingbacks -->
	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); echo __( ' RSS Feed', 'responsy' ); ?>" href="<?php bloginfo( 'rss2_url' ); ?>" />
	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); echo __( ' Comments Feed', 'responsy' ); ?>" href="<?php bloginfo( 'comments_rss2_url' ); ?>" />
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	
	<?php
		if ( get_option( 'favicon' ) != "" )
		{
			echo '<!-- Favicon -->' . "\n";
			echo '<link rel="shortcut icon" href="' . get_option( 'favicon' ) . '">' . "\n\n";
		}
		
		if ( get_option( 'apple_touch_icon' ) != "" )
		{
			$apple_touch_icon_src = get_option( 'apple_touch_icon' );
			$apple_touch_icon_src_no_ext = substr( $apple_touch_icon_src, 0, -4 );
			
			echo '<!-- Apple Touch Icon -->' . "\n";
			echo '<link rel="apple-touch-icon" href="' . $apple_touch_icon_src_no_ext . '-57x57.png' . '" />' . "\n";
			echo '<link rel="apple-touch-icon" sizes="72x72" href="' . $apple_touch_icon_src_no_ext . '-72x72.png' . '" />' . "\n";
			echo '<link rel="apple-touch-icon" sizes="114x114" href="' . $apple_touch_icon_src_no_ext . '-114x114.png' . '" />' . "\n";
			echo '<link rel="apple-touch-icon" sizes="144x144" href="' . $apple_touch_icon_src_no_ext . '-144x144.png' . '" />' . "\n";
		}
	?>

	<!-- Title -->
	<title><?php

				global $page, $paged;

				wp_title( '|', true, 'right' );

				bloginfo( 'name' );

				$site_description = get_bloginfo( 'description', 'display' );
				
				if ( $site_description && is_front_page() )
				{
					echo " | $site_description";
				}

				if ( $paged >= 2 || $page >= 2 )
				{
					echo ' | ' . sprintf( __( 'Page %s', 'responsy' ), max( $paged, $page ) );
				}
		
			?></title>
	
	<!-- Stylesheet -->
	<link rel="stylesheet" type="text/css" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
	
    <!--[if lt IE 9]><script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script><![endif]-->
	
	<?php
	
		if ( is_singular() && get_option( 'thread_comments' ) )
		{
			wp_enqueue_script( 'comment-reply' );
		}
	
	?>
	
	<script>
	
		// Slider Parameters
		var animationType = <?php if ( get_option( 'slide_animation_type' ) == "Fade" ) { echo '"fade"'; } else { echo '"slide"'; } ?>;
		var animSpeed = <?php if ( get_option( 'slide_animation_speed' ) != "" ) { echo get_option( 'slide_animation_speed' ); } else { echo '600'; } ?>;
		var slideTime = <?php if ( get_option( 'slide_waiting_time' ) != "" ) { echo get_option( 'slide_waiting_time' ); } else { echo '4000'; } ?>;
		
	</script>
	
	<!-- Theme Hook -->
	<?php
	
		wp_head();
		
	?>
	
	<?php
	
		if ( get_option( 'theme_style' ) == "Dark" )
		{
			echo '<link rel="stylesheet" type="text/css" href="' . get_template_directory_uri() . '/css/dark.css">';
		}
		elseif ( get_option( 'theme_style' ) == "Clean" )
		{
			// do nothing
		}
		else
		{
			echo '<link rel="stylesheet" type="text/css" href="' . get_template_directory_uri() . '/css/light.css">';
		}
		
	?>
	
	<?php
	
		if ( get_option( 'custom_css' ) != "" )
		{
			echo "\n" . '<style type="text/css">' . "\n" . "/* Custom CSS textarea styles */" . "\n" . stripcslashes( get_option( 'custom_css' ) ) . "\n" . '</style>' . "\n";
		}
		
	?>
	
	<?php
	
		echo "\n" . '<style type="text/css">' . "\n" . "/* Color Picker styles */" . "\n";
			
			// site_text_color
			if ( get_option( 'site_text_color' ) != "" )
			{
				echo 'body { color: #' . stripcslashes( get_option( 'site_text_color' ) ) . '; }' . "\n\n";
			}
			
			// site_background_color
			if ( get_option( 'site_background_color' ) != "" )
			{
				echo 'body { background-color: #' . stripcslashes( get_option( 'site_background_color' ) ) . '; }' . "\n\n";
			}
			
			// header_background_color
			if ( get_option( 'header_background_color' ) != "" )
			{
				echo 'header { background-color: #' . stripcslashes( get_option( 'header_background_color' ) ) . '; }' . "\n\n";
			}
			
			// footer_background_color
			if ( get_option( 'footer_background_color' ) != "" )
			{
				echo '.footer { background-color: #' . stripcslashes( get_option( 'footer_background_color' ) ) . '; }' . "\n\n";
			}
			
			// site_link_color
			if ( get_option( 'site_link_color' ) != "" )
			{
				echo 'a { color: #' . stripcslashes( get_option( 'site_link_color' ) ) . '; }' . "\n\n";
			}
			
			// site_link_hover_color
			if ( get_option( 'site_link_hover_color' ) != "" )
			{
				echo 'h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, .category a:hover, ul.categories li a:hover, .archives .list a:hover, .tags a:hover, .post .info a:hover { color: #' . stripcslashes( get_option( 'site_link_hover_color' ) ) . '; }' . "\n\n";
			}
			
			// site_link_hover_bg_color
			if ( get_option( 'site_link_hover_bg_color' ) != "" )
			{
				echo 'h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, .category a:hover, ul.categories li a:hover, .archives .list a:hover, .tags a:hover, .post .info a:hover { background-color: #' . stripcslashes( get_option( 'site_link_hover_bg_color' ) ) . '; }' . "\n";
			}
			
			// text_selection_color
			if ( get_option( 'text_selection_color' ) != "" )
			{
				echo '::-moz-selection { color: #' . stripcslashes( get_option( 'text_selection_color' ) ) . '; }' . "\n";
				echo '::selection { color: #' . stripcslashes( get_option( 'text_selection_color' ) ) . '; }' . "\n";
			}
			
			// text_selection_bg_color
			if ( get_option( 'text_selection_bg_color' ) != "" )
			{
				echo '::-moz-selection { background-color: #' . stripcslashes( get_option( 'text_selection_bg_color' ) ) . '; }' . "\n";
				echo '::selection { background-color: #' . stripcslashes( get_option( 'text_selection_bg_color' ) ) . '; }' . "\n";
			}
			
			// social_media_hover_color
			if ( get_option( 'social_media_hover_color' ) != "" )
			{
				echo '.social li a:hover { background-color: #' . stripcslashes( get_option( 'social_media_hover_color' ) ) . ' !important; }' . "\n";
			}
			
			// header_border_color
			if ( get_option( 'header_border_color' ) != "" )
			{
				echo '.header-wrap { border-color: #' . stripcslashes( get_option( 'header_border_color' ) ) . '; }' . "\n";
			}
			
			// tagline_border_color
			if ( get_option( 'tagline_border_color' ) != "" )
			{
				echo '.tagline { border-color: #' . stripcslashes( get_option( 'tagline_border_color' ) ) . '; }' . "\n";
			}
			
			// footer_border_color
			if ( get_option( 'footer_border_color' ) != "" )
			{
				echo '.footer { border-color: #' . stripcslashes( get_option( 'footer_border_color' ) ) . '; }' . "\n";
			}
			
			// site_background_image
			if ( get_option( 'site_background_image' ) != "" )
			{
				echo 'body { background-image: url(' . stripcslashes( get_option( 'site_background_image' ) ) . '); }' . "\n";
			}
			
			// header_background_image
			if ( get_option( 'header_background_image' ) != "" )
			{
				echo 'header { background-image: url(' . stripcslashes( get_option( 'header_background_image' ) ) . '); }' . "\n";
			}
			
			// footer_background_image
			if ( get_option( 'footer_background_image' ) != "" )
			{
				echo '.footer { background-image: url(' . stripcslashes( get_option( 'footer_background_image' ) ) . '); }' . "\n";
			}
			
		echo '</style>' . "\n";
	?>

	<?php
	
		if ( get_option( 'enable_contact_form7_styling' ) )
		{
			echo '<script>$(function(){ $( ".wpcf7 .row" ).find( "br" ).remove(); });</script>';
		}
		
		if ( get_option( 'external_css' ) != "" )
		{
			echo stripcslashes( get_option( 'external_css' ) );
		}
		
	?>
	
	<?php
	
		if ( get_option( 'tracking_code_head' ) != "" )
		{
			echo stripcslashes( get_option( 'tracking_code_head' ) );
		}
		
	?>

</head>

<body>

	<!-- HEADER -->
	<header class="header clearfix">
	
		<div class="container">
		
			<div class="row">
			
				<div class="header-wrap span12">
				
					<div class="row">
					
						<!-- LOGO -->
						<div id="logo" class="span4">
						
							<?php
							
								if ( get_option( 'enable_text_logo' ) )
								{
									echo '<h1><a href="' . esc_url( home_url( '/' ) ) . '">' . stripcslashes( get_option( 'text_logo' ) ) . '</a></h1>';
									
									if ( get_option( 'enable_text_slogan' ) )
									{
										echo '<p>' . stripcslashes( get_option( 'text_slogan' ) ) . '</p>';
									}
								}
								else
								{
									if ( get_option( 'image_logo' ) != "" )
									{
										if ( get_option( 'use_original_size_of_logo' ) ) { $use_original_size_of_logo_out = "max-height: none;"; } else { $use_original_size_of_logo_out = ""; }
										
										echo '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . get_option( 'image_logo' ) . '" alt="' . get_bloginfo( 'name' ) . '" style="' . $use_original_size_of_logo_out . '"></a>';
									}
									else
									{
										echo '<a href="' . esc_url( home_url( '/' ) ) . '"><img src="' . get_template_directory_uri() . '/img/logo-text.png" alt="' . get_bloginfo( 'name' ) . '"></a>';
									}
								}
								
							?>
						
						</div>
						<!-- end LOGO -->
						
						<!-- NAV -->
						<nav class="span8">
						
							<!-- PRIMARY NAV -->
							<?php wp_nav_menu( array( 'menu' => 'top_menu', 'menu_id' => 'nav', 'menu_class' => '', 'theme_location' => 'top_menu', 'container' => false, 'depth' => 0 ) ); ?>
							<!-- end PRIMARY NAV -->
							
							<!-- SOCIAL LINKS -->
							<ul class="social">
							
								<?php
								
									if ( get_option( 'enable_header_search' ) )
									{
										?>
											<form style="margin-bottom: 0px;" method="get" action="<?php echo home_url( '/' ); ?>">
											
												<div class="input-append" style="margin-bottom: 0px;">
												
													<input type="text" id="appendedPrependedInput" name="s" size="16" class="span3" style="padding: 6px !important; margin-bottom: 0px; max-width: 220px;" placeholder="<?php echo __( 'Enter keyword...', 'responsy' ); ?>" value="<?php the_search_query(); ?>">
													
													<input type="submit" id="searchsubmit" class="send" style="display: none;" value="Go">
													
												  </div>
												  
											</form>
										<?php
									}
									else
									{
										if ( get_option( 'social_facebook' ) != "" ) { echo '<li><a target="_blank" class="facebook" href="' . get_option( 'social_facebook' ) . '">Facebook</a></li>'; }
										
										if ( get_option( 'social_twitter' ) != "" ) { echo '<li><a target="_blank" class="twitter" href="' . get_option( 'social_twitter' ) . '">Twitter</a></li>'; }
										
										if ( get_option( 'social_google' ) != "" ) { echo '<li><a target="_blank" class="google" href="' . get_option( 'social_google' ) . '">Google+</a></li>'; }
										
										if ( get_option( 'social_tumblr' ) != "" ) { echo '<li><a target="_blank" class="tumblr" href="' . get_option( 'social_tumblr' ) . '">Tumblr</a></li>'; }
										
										if ( get_option( 'social_pinterest' ) != "" ) { echo '<li><a target="_blank" class="pinterest" href="' . get_option( 'social_pinterest' ) . '">Pinterest</a></li>'; }
										
										if ( get_option( 'social_linkedin' ) != "" ) { echo '<li><a target="_blank" class="linkedin" href="' . get_option( 'social_linkedin' ) . '">LinkedIn</a></li>'; }
										
										if ( get_option( 'social_skype' ) != "" ) { echo '<li><a target="_blank" class="skype" href="' . get_option( 'social_skype' ) . '">Skype</a></li>'; }
										
										if ( get_option( 'social_flickr' ) != "" ) { echo '<li><a target="_blank" class="flickr" href="' . get_option( 'social_flickr' ) . '">Flickr</a></li>'; }
										
										if ( get_option( 'social_picasa' ) != "" ) { echo '<li><a target="_blank" class="picassa" href="' . get_option( 'social_picasa' ) . '">Picasa</a></li>'; }
										
										if ( get_option( 'social_dribbble' ) != "" ) { echo '<li><a target="_blank" class="dribble" href="' . get_option( 'social_dribbble' ) . '">Dribble</a></li>'; }
										
										if ( get_option( 'social_forrst' ) != "" ) { echo '<li><a target="_blank" class="forrst" href="' . get_option( 'social_forrst' ) . '">Forrst</a></li>'; }
										
										if ( get_option( 'social_lastfm' ) != "" ) { echo '<li><a target="_blank" class="lastfm" href="' . get_option( 'social_lastfm' ) . '">Last.fm</a></li>'; }
										
										if ( get_option( 'social_vimeo' ) != "" ) { echo '<li><a target="_blank" class="vimeo" href="' . get_option( 'social_vimeo' ) . '">Vimeo</a></li>'; }
										
										if ( get_option( 'social_youtube' ) != "" ) { echo '<li><a target="_blank" class="youtube" href="' . get_option( 'social_youtube' ) . '">YouTube</a></li>'; }
										
										if ( get_option( 'social_rss' ) != "" ) { echo '<li><a target="_blank" class="rss" href="' . get_option( 'social_rss' ) . '">RSS</a></li>'; }
									}
								
								?>
							
							</ul>
							<!-- end SOCIAL LINKS -->
							
						</nav>
						<!-- end NAV -->
						
					</div>
					<!-- end row -->
					
				</div>
				<!-- end header-wrap -->
				
			</div>
			<!-- end row -->
			
		</div>
		<!-- end container -->
	
	</header>
	<!-- end HEADER -->

    <!-- CONTAINER -->
    <div class="container">